<div class="col2-set">
    <?php echo $this->getChildHtml('login_before')?>
    <div class="col-1">
        <h3><?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('New Customer') ?><?php endif; ?></h3>
        <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
            <p><?php echo $this->__('Register with us for future convenience:') ?></p>
        <?php else: ?>
            <p><strong><?php echo $this->__('Register and save time!') ?></strong><br />
            <?php echo $this->__('Register with us for future convenience:') ?></p>
            <ul>
                <li><?php echo $this->__('Fast and easy check out') ?></li>
                <li><?php echo $this->__('Easy access to your order history and status') ?></li>
            </ul>
        <?php endif; ?>
        <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
            <ul class="form-list">
                <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
                <li class="control">
                    <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
                </li>
                <?php endif; ?>
                <li class="control">
                    <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
                </li>
            </ul>
            <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
        <?php else: ?>
            <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
        <?php endif; ?>
        <div class="buttons-set for-mobile">
            <button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>
        </div>
    </div>
    <div class="col-2">
        <h3><?php echo $this->__('Registered customers') ?></h3>
        <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
        <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
        <fieldset>
            <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
            <ul class="form-list">
                <li>
                    <div class="input-box">
                        <input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" placeholder="<?php echo $this->__('Enter Your Email *') ?>" />
                    </div>
                </li>
                <li>
                    <div class="input-box">
                        <input type="password" class="input-text required-entry" id="login-password" name="login[password]" placeholder="<?php echo $this->__('Enter Your Password *') ?>" />
                    </div>
                </li>
<?php /* Begin rememberme customisation */ ?>
                <li class="control">
                    <div class="input-box">
                        <input type="checkbox" name="login[rememberme]" class="checkbox" id="rememberme" title="<?php echo $this->__('Remember me') ?>" style="margin-top: 2px" />
                        <label for="rememberme" class="input-box"><?php echo $this->__('Remember password') ?></label>
                    </div>
                </li>
<?php /* End rememberme customisation */ ?>
            </ul>
        </fieldset>
        </form>
        <div class="buttons-set for-mobile">
            <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-right"><?php echo $this->__('Forgot your password?') ?></a>
            <button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
        </div>
    </div>
</div>
<div class="col2-set for-desktop">
    <div class="col-1">
        <div class="buttons-set">
            <button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>
        </div>
    </div>
    <div class="col-2">
        <div class="buttons-set">
            <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-right"><?php echo $this->__('Forgot your password?') ?></a>
            <button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
        </div>
    </div>
</div>
<script type="text/javascript">
//<![CDATA[
    var loginForm = new VarienForm('login-form', true);
    $('login-email').observe('keypress', bindLoginPost);
    $('login-password').observe('keypress', bindLoginPost);
    function bindLoginPost(evt){
        if (evt.keyCode == Event.KEY_RETURN) {
            loginForm.submit();
        }
    }
    function onepageLogin(button)
    {
        if(loginForm.validator && loginForm.validator.validate()){
            button.disabled = true;
            loginForm.submit();
        }
    }
//]]>
</script>
